import $axios from "@/utils/request.js";

// 新增评论
export function saveComment(data) {
    return $axios.post('/api/comment/save', data);
}

// 删除评论
export function removeCommentById(id) {
    return $axios.delete(`/api/comment/delete/${id}`);
}

// 获取评论
export function getArticleCommentList(postId) {
    return $axios.get('/api/comment/frontend/list', {
        params: {
            postId: postId
        }
    });
}

// 获取评论
export function getCommentList(params) {
    return $axios.get('/api/comment/list', {params});
}